<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmcSystemConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cmc_system_config', function (Blueprint $table) {
            $table->increments('id');
            $table->string('menu_name')->default('')->comment('字段名称');
            $table->string('type')->default('')->comment('类型(文本框,单选按钮...)');
            $table->string('input_type')->default('input')->nullable()->comment('表单类型');
            $table->unsignedInteger('config_tab_id')->comment('配置分类id');
            $table->string('parameter')->nullable()->comment('规则 单选框和多选框');
            $table->unsignedTinyInteger('upload_type')->nullable()->comment('上传文件格式1单图2多图3文件');
            $table->string('required')->nullable()->comment('规则');
            $table->unsignedInteger('width')->nullable()->comment('多行文本框的宽度');
            $table->unsignedInteger('high')->nullable()->comment('多行文框的高度');
            $table->string('value')->nullable()->comment('默认值');
            $table->string('info')->default('')->comment('配置名称');
            $table->string('desc')->nullable()->comment('配置简介');
            $table->unsignedInteger('sort')->default('0')->comment('排序');
            $table->unsignedTinyInteger('status')->default('0')->comment('是否隐藏');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cmc_system_config');
    }
}
